package reflect;
/*
通过反射机制访问注释
 */
public class ReflectDemo9 {
    public static void main(String[] args) throws ClassNotFoundException {
        //查看Person上是否被注释@AutoRunClass标注
        //获取类对象
        Class cls=Class.forName("reflect.Person");
        boolean mark=cls.isAnnotationPresent(AutoRunClass.class);
        if (mark){
            System.out.println("被标注了");
        }else {
            System.out.println("没有被标注");
        }

    }
}
